<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
</head>
<body>
	<script type="text/javascript">
		window.onload = function(){
			var link = document.getElementById('link');
			alert(1);
			console.log(link.href);
		};
	</script>
	<a href="test1.html" id="link"></a>
</body>
</html>